<!DOCTYPE html>
<html xmlns:wb="http://open.weibo.com/wb">

<head>
    <meta charset="UTF-8" />
    <!-- <meta name="viewport" content="width=device-width, initial-scale=1.0"> -->
    <title>thin.js</title>
    <link rel="stylesheet" href="https://com.wf.pub/thin.css" />
    <style>
        label {
            width: auto;
        }
    </style>
</head>

<body>
    <div class="test_container">

    </div>
    <script src="https://com.wf.pub/jquery.js"></script>
    <script src="https://com.wf.pub/thin.js"></script>
    <!-- <script src="thin.js"></script> -->

    <script>
        $('.test_container').render({
            // data: data,
            template: {
                e: 'form',
                t: {
                    e: "label",
                    t: [
                        "性别：",
                        {
                            e: 'select',
                            a: {
                                name: "sex",
                            },
                            // 1.string
                            // options: '男,女',
                            // 2.array
                            // options: [
                            //     '男', '女'
                            // ]
                            // 3.object
                            options: {
                                男: 'man',
                                女: 'woman'
                            },
                            // 4.普通渲染option标签
                            // t: [
                            //     '<option value="man">男</option>',
                            //     '<option value="woman">女</option>'
                            // ],
                            selected: 'woman',
                        }
                    ]
                }
            }
        });
    </script>
</body>

</html>